package cuShapes;

import java.awt.*;
import javax.xml.bind.annotation.*;
import java.awt.geom.Line2D;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="xmlstraightline")
public class StraightLine extends PQLine{
	
	
	public StraightLine(){}
	
	public StraightLine (Point start, Point end, Color c) {
		color = new Color(c.getRGB());
		p1 = start;
		p2 = end;
	}
	
	public void setStart(Point start) {
		p1 = start;
	}
	
	public void setEnd(Point end) {
		p2 = end;
	}

	public void drawLine(Graphics2D g2) {
		g2.setColor(color);
		g2.draw(new Line2D.Double(p1, p2));
	}

	@Override
	public Point getEnd() {
		return p2;
	}

	@Override
	public Point getStart() {
		// TODO Auto-generated method stub
		return p1;
	}

}
